/*
 * @Description:
 * @Version: 2.0
 * @Autor: wangmiao
 * @Date: 2022-07-08 18:23:34
 * @LastEditors: wangmiao
 * @LastEditTime: 2022-09-07 11:16:43
 */
import React, { useEffect, useState } from 'react'
import { Button } from 'antd'
import { useAppDispatch, useAppSelector } from '../../store/hooks'
import { increment } from '@/store/slice/counter'
import { getAppIds } from '@/request/Test/Test'
const Index: React.FC = () => {
  const { value } = useAppSelector((state) => state.counter)
  const dispatch = useAppDispatch()
  const [appList, setAppList] = useState()

  const addValue = () => {
    dispatch(increment())
  }
  const getInitData = async () => {
    console.log('333333333333')
    const res = await getAppIds()
    console.log(res, '333333333333')
  }
  useEffect(() => {
    getInitData()
  }, [])

  return (
    <>
      <div>
        <Button onClick={addValue} type='primary'>
          增加
        </Button>
        <span>{value}</span>
      </div>
    </>
  )
}

export default Index
